package cn.cvs.entity;

import java.util.Date;

/**
 * '竞拍记录'
 */
public class Auctionrecord {
    private int id;                 //竞拍记录编号
    private int userId;             //竞拍者编号
    private int auctionId;          //拍卖品编号
    private Date auctionTime;       //竞价时间
    private double auctionPrice;    //竞拍价格

    private String userName;  //竞拍人姓名

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public String toString() {
        return "Auctionrecord{" +
                "id=" + id +
                ", userId=" + userId +
                ", auctionId=" + auctionId +
                ", auctionTime=" + auctionTime +
                ", auctionPrice=" + auctionPrice +
                '}';
    }

    public Auctionrecord(int id, int userId, int auctionId, Date auctionTime, double auctionPrice) {
        this.id = id;
        this.userId = userId;
        this.auctionId = auctionId;
        this.auctionTime = auctionTime;
        this.auctionPrice = auctionPrice;
    }

    public Auctionrecord() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getAuctionId() {
        return auctionId;
    }

    public void setAuctionId(int auctionId) {
        this.auctionId = auctionId;
    }

    public Date getAuctionTime() {
        return auctionTime;
    }

    public void setAuctionTime(Date auctionTime) {
        this.auctionTime = auctionTime;
    }

    public double getAuctionPrice() {
        return auctionPrice;
    }

    public void setAuctionPrice(double auctionPrice) {
        this.auctionPrice = auctionPrice;
    }
}




    /*CREATE TABLE `auctionrecord` (
        `id` BIGINT(11) NOT NULL AUTO_INCREMENT COMMENT '竞拍记录编号',
        `userId` BIGINT(11) DEFAULT NULL COMMENT '竞拍者编号',
        `auctionId` BIGINT(11) NOT NULL COMMENT '拍卖品编号',
        `auctionTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '竞价时间',
        `auctionPrice` DECIMAL(9,2) NOT NULL COMMENT '竞拍价格',
        PRIMARY KEY (`id`),
        KEY `FK_rec_REF_user` (`userId`),
        KEY `FK_rec_REF_AUC` (`auctionId`),
        CONSTRAINT `FK_rec_REF_AUC` FOREIGN KEY (`auctionId`) REFERENCES `auction` (`auctionId`),
        CONSTRAINT `FK_rec_REF_user` FOREIGN KEY (`userId`) REFERENCES `auctionuser` (`userId`)
        ) ENGINE=INNODB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='竞拍记录';*/
